package com.ys.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ys.common.utils.PageUtils;
import com.ys.gulimall.member.entity.MemberEntity;
import com.ys.gulimall.member.exception.PhoneExistException;
import com.ys.gulimall.member.exception.UserNameExistException;
import com.ys.gulimall.member.vo.MemberLoginVo;
import com.ys.gulimall.member.vo.MemberRegisterVo;
import com.ys.gulimall.member.vo.SocialUser;

import java.util.Map;

/**
 * 会员
 *
 * @author yeswater
 * @email ruobairuo@gmail.com
 * @date 2021-07-17 15:19:59
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);
	
	void register(MemberRegisterVo vo);
	
	void checkPhoneUnique(String phone) throws PhoneExistException;
	
	void checkUserNameUnique(String userName) throws UserNameExistException;
	
	/**
	 * 用户登录
	 */
	MemberEntity login(MemberLoginVo vo);
	
	/**
	 * 社交用户的登录
	 * @param socialUser
	 */
	MemberEntity login(SocialUser socialUser) throws Exception;
	
	/**
	 * 微信登录
	 * @param accessTokenInfo
	 */
	//MemberEntity login(String accessTokenInfo);
}

